import java.io.*;
import java.util.*;
import java.math.BigInteger;
import java.lang.String;
class Main
{
	public static void main(String args[]) throws Exception
	{
		Scanner cin=new Scanner(System.in);
		BigInteger bd;
		BigInteger ans = new BigInteger("0");
		BigInteger up, low, tmp, tmp2; 
		String s;
		int val, i, l;
		while (cin.hasNext())
		{
			s = cin.next();
			bd = new BigInteger(s);
			if (bd.equals(BigInteger.ZERO))
			{
				System.out.println("0 0.0000000000\n");
				continue;
			}
			bd = bd.multiply(BigInteger.TEN.pow(33));
			up = bd.add(BigInteger.ONE);
			low = BigInteger.ZERO;
			tmp = bd;
			while (!up.equals(low.add(BigInteger.ONE)))
			{
				tmp = (up.add(low)).divide(BigInteger.valueOf(2));
				tmp2 = tmp.pow(3);
				if (tmp2.compareTo(bd) > 0)	up = tmp;
				else	low = tmp;
			}
			s = low.toString();
			l = s.length();
			for (i = 0, val = 0; i < l - 1; i++)
			{
				val += s.charAt(i) - '0';
				val %= 10;
			}
			System.out.print(val + " ");
			for (i = 0; i < l - 11; i++)
				System.out.print(s.charAt(i));
			System.out.print(".");
			for (; i < l - 1; i++)
				System.out.print(s.charAt(i));
			System.out.println();
		}
	}
}
